//初始化model for (var i = 0; i < 4; i++) { config.keyList.add(GlobalKey()); } config.position = 100.0;
_listScrollC.addListener(() { if (config.handleData()) { setState(() {}); } }); }
@override Widget build(BuildContext context) { // This method is rerun every time setState is called, for instance as done // by the _incrementCounter method above. // // The Flutter framework has been optimized to make rerunning build methods // fast, so that you can just rebuild anything that needs updating rather // than having to individually change instances of widgets. return Scaffold( appBar: AppBar( // Here we take the value from the MyHomePage object that was created by // the App.build method, and use it to set our appbar title. title: Text('列悬浮'), ), body: Stack( children: <Widget>[ ListView.builder( controller: _listScrollC, itemBuilder: (BuildContext context, int index) { if (index == 1) { return getHeadView(0, true); }